-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[PATCH 7/7] [clang] improve NestedNameSpecifier: LLDB changes #149949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH 7/7] [clang] improve NestedNameSpecifier: LLDB changes #149949
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-lldb Author: Matheus Izvekov (mizvekov) ChangesTest run of the LLDB CI, just checking if anything needs to be updated there. Full diff: https://github.com/llvm/llvm-project/pull/149949.diff 1 Files Affected:
diff --git a/lldb/DELETE.ME b/lldb/DELETE.ME
new file mode 100644
index 0000000000000..e69de29bb2d1d
|
3c8cbad
to
7c873c4
Compare
7c873c4
to
2c01149
Compare
lldb/test/Shell/SymbolFile/DWARF/x86/typedef-in-incomplete-type.cpp
Outdated
Show resolved
Hide resolved
998f226
to
47b79ce
Compare
285569d
to
968ecb4
Compare
✅ With the latest revision this PR passed the Python code formatter. |
b8c6168
to
ea97cf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm yea I don't think we want to be losing the scope qualifiers for the typenames. What does LLDB have to do to retain those?
The answer to that depends on what LLDB wants and can do here. The status quo is, the types produced in the places changed here are not valid as-written types, as they lacked an ElaboratedType. Clang will currently print types lacking an ElaboratedType as if they were fully qualified, with a synthesized name qualifier. This is used to distinguish canonical from non-canonical types, and the motivation is that we find it more appropriate to print canonical types as fully qualified when they appear in diagnostics and such. Now with this patch series, we retain the ability to distinguish canonical RecordTypes and EnumTypes, and still print those as fully qualified. But a mis-feature of the status quo is removed: the same would work for TypedefTypes, if they lacked an ElaboratedType on top, then we would fully qualify them when printing. But this was not an intentional feature, and it lacks motivation, as TypedefTypes never appear in canonical types. Now, does LLDB want to keep fully qualified names here, or does it want these to be printed as-written? Changing this back to the status quo is more straight-forward, we just need to synthesize fully qualified types. This is taking me a while because it's currently very difficulty for me to get a functional LLDB workflow on MacOS, so To change this to as-written, we would need to figure out if we have a source for this information first, if we store and can retrieve those from all of the Debug info formats we support. |
ea97cf5
to
ba9b546
Compare
47b79ce
to
ff2bfb3
Compare
bd69857
to
b894c91
Compare
52b954b
to
bcd1eeb
Compare
24638a4
to
552fc80
Compare
@Michael137 this is ready for another look. |
552fc80
to
4abdd23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for ensuring we don't lose the scope in our typenames! LGTM
@mizvekov do you have a macOS machine handy to test this on? Or do you want me to try? |
I don't think there is anything macOS specific about this change. My main development machine is macOS, and I always struggled with testing LLDB on it. But I finally setup a Linux VM on it, and all that went fine without a single hitch. Besides, our CI is Linux based, and that passes as well. |
There are tests that only run on macOS. I just want to avoid a situation where we have to revert the entire patch series because of some macOS post-merge test failures. Ideally we'd catch these pre-merge on Github, but that's currently not set up unfortunately. Since you don't have the setup, let me run the tests. I'll report back tomorrow |
Ah okay. Any easy way for me to tell which are these tests? I can run some of the tests locally, but not all of them passes, but that's the case for main branch llvm as well. |
Hmmm getting this error when building the patch series locally
Any ideas?
Hmm not that I'm aware of |
That's probably missing a |
We do include it from Is this is building LLVM from a clean build directory? |
That builds cleanly on a MacOS machine and the tests for that checker pass. If you can still reproduce that even from a clean build, please share repro steps. |
I would approve if I could. 👍 |
Clean build succeeded. These tests fail on macOS:
|
Thanks, I'll see if I can reproduce locally. Mind sharing the logs meanwhile so I can compare? |
Attached the test log |
Thanks. Unfortunately those are some of the tests which always fail for me. Here is how they fail:
This is even on main branch. I figured this has something to do with the apple libcxx type aware allocator mess, but I wonder if there is a way around that problem I am not aware of. |
I managed to fix that, it was some problem with using |
Patch series starting at #147835
bcd1eeb
to
4dc827b
Compare
4abdd23
to
278d0ca
Compare
Alright, these three macOS-only test failures are fixed now, I tested locally. I am moving ahead with the merge. |
69c0d44
into
users/mizvekov/name-qualification-refactor-6
Patch series starting at #147835